<?php
	include_once("conn.php");
	$tid = $_GET["tid"];
	$back_board = $_GET["back_board"];

	$sql = "update bbs_topic set t_state = 0 where t_id = '".$tid."'";
	$result = mysql_query($sql);
	
	if(!$result) 
	{
		echo "<script>alert('取消置顶出错！');window.location = 'browse.php?board=".$back_board."&tid=".$tid."';</script>";
	}
	else {
		echo "<script>window.location = 'browse.php?board=".$back_board."&tid=".$tid."';</script>";			
	}

?>